/*
File      : ServerInterface.java - Interface file which is implemented by ServerImplementation.java
            It contains set of interfaces that have been exposed to the client to communicate with the server.
Author    : Kunal Cholera.
Project 4 : Group Chat Application using Java RMI - Remote Method Invocation.
Course    : Distributed Systems.
Institute : University of Southern California - Viterbi School of Engineering.

*/

import java.rmi.*;

public interface ServerInterface extends java.rmi.Remote{
	
	// Testing function...
	public String sayHello( String userName ) throws java.rmi.RemoteException;


    // Service number 1 -> Creates an Account for the entered username
	public Boolean createAccount( String userName ) throws java.rmi.RemoteException;

	
	// Service 2 - Loggs all existing account holders in and also loggs all the users out when they press 0
	public Boolean login( String userName ) throws java.rmi.RemoteException;
	public Boolean checkLoginName( String userName ) throws java.rmi.RemoteException;	
	public Boolean logout( String userName ) throws java.rmi.RemoteException;


	// Service number 3 -> shows all valid user accounts and shows all Live Users of Group chat Application
	public String showUserStatus() throws java.rmi.RemoteException;


	// Service 4 - Displays the menu - two types, the one used during the login process, check if valid user and then logs user
	public String displayMenu( String menuType) throws java.rmi.RemoteException;

	
	// Service 5 and 6 - Used to emulate the effect of Multicast IP address where in all the messages are sent to all clients....
	// Used form the Advanced RMI chapter of the text book to emulate Group Chat application...
	public void floodMessage( String message ) throws java.rmi.RemoteException;
	public void registerForCallback( ClientInterface callbackClientObject ) throws java.rmi.RemoteException;
	public void unregisterForCallback( ClientInterface callbackClientObject ) throws java.rmi.RemoteException;	

}